﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebsiteManage.aspx.cs"
    Inherits="NJL.WebManage.SystemAdmin.WebsiteManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="/Scripts/js/jquery.skygqbox.1.3.js" type="text/javascript" charset="UTF-8"></script>
    <script type="text/javascript">
        function textboxSelect() {
            var checkbox = document.getElementsByName("cbxSingle");
            for (var i = 0; i < checkbox.length; i++) {
                checkbox[i].checked = !checkbox[i].checked;
            }
        }
        function checkCheckboxState() {
            var checkbox = document.getElementsByName("cbxSingle");
            var hiddenId = "";
            var count = 0;
            for (var i = 0; i < checkbox.length; i++) {
                if (checkbox[i].checked == true) {
                    hiddenId += checkbox[i].value + ",";
                    count++;
                }
            }
            if (count == 0) {
                alert('请选择您要删除的记录')
                return false;
            }
            else {
                if (window.confirm("您确定要删除该记录？")) {
                    hiddenId = hiddenId.substring(0, hiddenId.length - 1);
                    document.getElementById("<%=HSelectId.ClientID %>").value = hiddenId;
                }
                else {
                    return false;
                }
            }
        }
        function tickvalue(id, typeId) {
            document.getElementById("tick").src = "WebSiteContact.aspx?id=" + id + "&typeId=" + typeId;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="main_content fr">
        <div class="gray_bd">
            <div class="table_title">
                站点管理</div>
            <div class="pad5px">
                <div class="border_b_dotted">
                    <table class="tableliststyle" cellspacing="0" rules="all" border="1">
                        <tr class="gridheader">
                            <th style="width: 40px;">
                                <input id="cbxAll" type="checkbox" onclick="textboxSelect()" />
                            </th>
                            <th style="width: 50px;">
                                序号
                            </th>
                            <th style="width: 100px;">
                                名称
                            </th>
                            <th>
                                域名
                            </th>
                            <th>
                                负责人
                            </th>
                            <th style="width: 300px">
                                编辑联系方式
                            </th>
                            <th style="width: 40px;">
                                编辑
                            </th>
                            <th style="width: 40px;">
                                删除
                            </th>
                        </tr>
                        <asp:Repeater ID="rptUserList" runat="server" OnItemCommand="rptUserList_ItemCommand"
                            OnItemDataBound="rptUserList_ItemDataBound">
                            <ItemTemplate>
                                <tr>
                                    <td align="center">
                                        <input id="<%#Eval("ID") %>" type="checkbox" value="<%#Eval("ID") %>" name="cbxSingle" />
                                    </td>
                                    <td align="center">
                                        <asp:Literal ID="litNum" runat="server"></asp:Literal>
                                    </td>
                                    <td align="left">
                                        <%#Eval("WEBSITE_NAME")%>
                                    </td>
                                    <td>
                                        <%#Eval("WEBSITE_DOMAIN")%>
                                    </td>
                                    <td>
                                        <%#Eval("WEBSITE_ADMIN")%>
                                    </td>
                                    <td align="center">
                                        <span <%#Eval("ID").ToString()=="1"?"style=display:none":""%>><a href="javascript:$('#win').skygqbox();tickvalue('<%#Eval("ID") %>','GGHZ')">
                                            广告合作 </a>|<a href="javascript:$('#win').skygqbox();tickvalue('<%#Eval("ID") %>','PWKF')">
                                                票务客服 </a>|<a href="javascript:$('#win').skygqbox();tickvalue('<%#Eval("ID") %>','BJCH')">
                                                    编辑策划 </a>|<a href="javascript:$('#win').skygqbox();tickvalue('<%#Eval("ID") %>','SHTS')">
                                                        售后投诉 </a>|<a href="javascript:$('#win').skygqbox();tickvalue('<%#Eval("ID") %>','FZJM')">
                                                            分站加盟 </a></span>
                                    </td>
                                    <td align="center">
                                        <a href="EditWebsite.aspx?id=<%#Eval("ID") %>">编辑</a>
                                    </td>
                                    <td align="center">
                                        <asp:LinkButton ID="lbtnDel" runat="server" CommandName="Del" CommandArgument='<%#Eval("ID") %>'
                                            OnClientClick="return confirm('您确定要删除该管理员吗？')" Enabled="false">删除</asp:LinkButton>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                    <div style="text-align: left; margin-top: 5px;">
                        <asp:Button ID="btnDel" runat="server" Text="删除" OnClientClick="return checkCheckboxState()"
                            OnClick="btnDel_Click1" Enabled="false" />
                    </div>
                </div>
                <div style="text-align: center">
                    共
                    <asp:Literal ID="lit" runat="server"></asp:Literal>
                    条记录&nbsp;&nbsp;&nbsp;&nbsp; 共
                    <asp:Literal ID="litAllPage" runat="server"></asp:Literal>
                    页&nbsp;&nbsp;&nbsp;&nbsp; 第
                    <asp:Literal ID="litCurrentPage" runat="server"></asp:Literal>
                    页
                    <asp:LinkButton ID="lbtnFirst" runat="server" OnClick="lbtnFirst_Click">首页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnPrev" runat="server" OnClick="lbtnPrev_Click">上一页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnNext" runat="server" OnClick="lbtnNext_Click">下一页</asp:LinkButton>&nbsp;
                    <asp:LinkButton ID="lbtnEnd" runat="server" OnClick="lbtnEnd_Click">末页</asp:LinkButton>
                    跳转到第
                    <asp:TextBox ID="txtPage" runat="server" Width="32px" MaxLength="8" Style="text-align: center"></asp:TextBox>&nbsp;页&nbsp;
                    <asp:Button ID="btnRir" runat="server" Text="确定" OnClick="btnRir_Click" />
                </div>
            </div>
        </div>
        <asp:HiddenField ID="HSelectId" runat="server" />
    </div>
    </form>
    <div id="win" style="padding: 10px; display: none; width: 650px">
        <iframe id="tick" width="650" height="350" scrolling="auto"></iframe>
    </div>
</body>
</html>
